package com.amt.olcacon;

import java.util.ArrayList;
import java.util.List;

// 树节点类
public class TreeNode {
    private String name;
    private List<TreeNode> children;
    
    public TreeNode(String name) {
        this.name = name;
        this.children = new ArrayList<>();
    }
    
    public void addChild(TreeNode child) {
        children.add(child);
    }
    
    // getter方法
    public String getName() { return name; }
    public List<TreeNode> getChildren() { return children; }
}